
import md5 from '../utils/md5.js';

var mysign = {
	secret:'abcdefghijklmn',
	sort: function(b) {
		for (var a = Object.keys(b).sort(), c = {}, d = 0; d < a.length; d++) c[a[d]] = b[a[d]];
		return c
	},
	getSign: function(b) {
		b = mysign.sort(b);
		var a;
		a = mysign.secret;
		for (var c in b) a += c, a += b[c];
		a += mysign.secret;
		return md5.hex_md5(a)
	}
};

function getSign(param){
   return  mysign.getSign(param);
}
export default {
    getSign
}
